package com.example.demo.servlet;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author zhouhong 自定义servelet
 * @create 2018/4/4
 * @modify
 */
//@WebServlet
public class CustomServelet extends HttpServlet {
    private static final Logger SERVELET_LOGGER= LoggerFactory.getLogger(CustomServelet.class);
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        SERVELET_LOGGER.info("get请求进入filter");
        super.doGet(req, resp);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        SERVELET_LOGGER.info("post请求进入filter");
        super.doPost(req, resp);
    }
}
